import request from '@/utils/request'

// 创建投票结果信息详情
export function createUserResultDetail(data) {
  return request({
    url: '/vote/user-result-detail/create',
    method: 'post',
    data: data
  })
}

// 更新投票结果信息详情
export function updateUserResultDetail(data) {
  return request({
    url: '/vote/user-result-detail/update',
    method: 'put',
    data: data
  })
}

// 删除投票结果信息详情
export function deleteUserResultDetail(id) {
  return request({
    url: '/vote/user-result-detail/delete?id=' + id,
    method: 'delete'
  })
}

// 获得投票结果信息详情
export function getUserResultDetail(id) {
  return request({
    url: '/vote/user-result-detail/get?id=' + id,
    method: 'get'
  })
}

// 获得投票结果信息详情分页
export function getUserResultDetailPage(query) {
  return request({
    url: '/vote/user-result-detail/page',
    method: 'get',
    params: query
  })
}

// 导出投票结果信息详情 Excel
export function exportUserResultDetailExcel(query) {
  return request({
    url: '/vote/user-result-detail/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
